﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Freshbooks.XmlSerializers;

namespace Freshbooks.Model
{
    [FreshbooksSerialization(Name = "project")]
    public class Project
    {
        [FreshbooksSerialization(Name = "project_id")]
        public int ProjectId { get; set; }

        [FreshbooksSerialization(Name = "name")]
        public string Name { get; set; }

        [FreshbooksSerialization(Name = "description")]
        public string Description { get; set; }

        [FreshbooksSerialization(Name = "rate")]
        public float Rate { get; set; }

        [FreshbooksSerialization(Name = "bill_method")]
        public string BillMethod { get; set; }

        [FreshbooksSerialization(Name = "client_id")]
        public int ClientId { get; set; }

        [FreshbooksSerialization(Name = "hour_budget")]
        public float HourBudget { get; set; }

        [FreshbooksSerialization(Name = "tasks")]
        public List<ProjectTask> Tasks{ get; set; }

        [FreshbooksSerialization(Name = "staff")]
        public List<ProjectStaff> Staff { get; set; }

        [FreshbooksSerialization(Name = "task")]
        public class ProjectTask
        {
            [FreshbooksSerialization(Name = "task_id")]
            public int TaskId { get; set; }

            [FreshbooksSerialization(Name = "rate")]
            public float Rate { get; set; }
        }

        [FreshbooksSerialization(Name = "staff")]
        public class ProjectStaff
        {
            [FreshbooksSerialization(Name = "staff_id")]
            public int StaffId { get; set; }
        }
    }
}
